package com.temp.dto;

import com.temp.annotation.LoginNameUnique;
import com.temp.annotation.Xss;
import lombok.Data;
import org.hibernate.validator.constraints.Length;

import javax.validation.constraints.Pattern;

@Data
public class UpdateUserInfoDTO {

    @Length(min = 4, max = 20, message = "apiMsg.userNameRange,4~20")
    @LoginNameUnique
    @Xss(message = "apiMsg.usernameXss")
    private String username;

    private String description;

    private String avatarUrl;

    @Pattern(regexp = "^T[a-zA-Z0-9]{33}$|", message = "apiMsg.walletAddressNotValid,34")
    private String paypalAccount;
}
